<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="org.ycty.entity.Swt"%>
<%@page import="org.ycty.dao.HibernateSessionFactory"%>
<%@page import="org.ycty.ip.GetInfomesg"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	//String img = new GetInfomesg().getCity(request.getRemoteAddr());
	String img = new GetInfomesg().getCity("60.8.6.89");
	//String img = "从前";
	Swt swt = (Swt) HibernateSessionFactory.getSession().createQuery(
			"from Swt where pathname=?").setString(0, ((img.length()>10)?null:img)).uniqueResult();
%>
(function(){ 
	var ycty_id = document
	n = function() {
		this.init() 
		}; 
	n.prototype = {
	 init: function(){ 
	 	this.showSWT();
	 	 }, 
	 showSWT: function(){ 
	 	document.write(<%=((swt!=null)?swt.getSwtjs():img)%>);
		}
	}
 try {
 	var e = new n; 
 	e.showSWT();
 	 } catch(k) { 
 	 alert(k);
 } 
})();
